From 2460b407ce7f0b4a014e45f4b8c43ab5ad8d571d Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Fri, 9 Sep 2005 17:48:00 +0000 Subject: [PATCH] Don't set unsigned ints to -1. (#315481, Kjartan Maraas) 2005-09-09 Matthias Clasen * gtk/gtkwindow.c (gtk_window_parse_geometry): Don't set unsigned ints to -1. (#315481, Kjartan Maraas) --- ChangeLog | 3 +++ ChangeLog.pre-2-10 | 3 +++ gtk/gtkwindow.c | 12 ++++-------- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index b45ff6fcb6..59a217590a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2005-09-09 Matthias Clasen + * gtk/gtkwindow.c (gtk_window_parse_geometry): Don't set + unsigned ints to -1. (#315481, Kjartan Maraas) + * gtk/gtkcalendar.c (gtk_calendar_init): first_weekday is relative to week_1stday, not to Sunday. Gotta love the ISO 14652 guys... (#314473, Stanislav Brabec) diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index b45ff6fcb6..59a217590a 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,5 +1,8 @@ 2005-09-09 Matthias Clasen + * gtk/gtkwindow.c (gtk_window_parse_geometry): Don't set + unsigned ints to -1. (#315481, Kjartan Maraas) + * gtk/gtkcalendar.c (gtk_calendar_init): first_weekday is relative to week_1stday, not to Sunday. Gotta love the ISO 14652 guys... (#314473, Stanislav Brabec) diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c index 904c12c09e..572565625b 100644 --- a/gtk/gtkwindow.c +++ b/gtk/gtkwindow.c @@ -7339,17 +7339,13 @@ gtk_window_parse_geometry (GtkWindow *window, result = gtk_XParseGeometry (geometry, &x, &y, &w, &h); - if ((result & WidthValue) == 0 || - w < 0) - w = -1; - if ((result & HeightValue) == 0 || - h < 0) - h = -1; - size_set = FALSE; if ((result & WidthValue) || (result & HeightValue)) { - gtk_window_set_default_size_internal (window, TRUE, w, TRUE, h, TRUE); + gtk_window_set_default_size_internal (window, + TRUE, result & WidthValue ? w : -1, + TRUE, result & HeightValue ? h : -1, + TRUE); size_set = TRUE; } -- 2.30.2